package com.qs.exception;

/**
 * ClassName: ServiceException
 * Package: com.sixkey.exception
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2023/9/27 - 17:32
 * @Version: v1.0
 */

import com.qs.response.ResponseEnum;

/**
 * 业务异常
 */
public class ServiceException extends RuntimeException{
    private int code;
    private String message;

    public ServiceException(ResponseEnum responseEnum){
        this.code = responseEnum.getCode();
        this.message = responseEnum.getMessage();
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
